
<%= simple_form_for(@purchase_order) do |f| %>
  <%= f.error_notification %>
  <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>

  <div class="form-inputs">
    <%= f.input :po_number, label: "合同号" %>    
    <%= f.input :supplier_id, collection: Supplier.all, label:"供应商" %>
    <%= f.input :date ,label: "合同日期" %>
    <%= f.input :amount,label: "合同金额" %>
    <%= f.input :payment_term ,label: "结算方式" %>
    <%= f.input :dueday ,label: "应付款日期" %>    
    
    <%= f.input :invoice_state,label: "发票状态" %>
    <%= f.input :invoice_no,label: "发票号" %>
    <%= f.input :invoice_amount,label: "发票金额" %>
    <%= f.input :invoice_received_date,label: "到票日期" %>
    <%= f.input :amount_paid,label: "已付金额" %>
    <%= f.input :balance,label: "余额" %>
    
    
  </div>

  <div class="form-actions">
    <%= f.button :submit, "提交" , class: "btn btn-primary" %>
  </div>
<% end %>
